<?php
$this->breadcrumbs=array(
	Yii::t('labs', 'Labs')=>array('index'),
	$model->project->pro_title=>array('view','id'=>$model->project->pro_id),
	Solution::model()->getBrifeDescript($model)
);
$this->widget('ext.code.syntaxhighlighter.syntaxhighlighterWidget');
?>

            <div class="post single clearfix">
                <hr />
					
					<h2><?php echo $model->project->pro_title; ?></h2>
					
				<ul class="post-meta">
                    <li class="author">By <a href="./blog_post.html"><?php echo $model->user->user_name;?></a></li>
                    <li class="date"><?php echo UtilTools::timeop($model->project->pro_created);?></li>
                    <li class="tags"><?php echo Tag::model()->tagsToLinks($model->project->pro_tags, 'labs/tags');?></li>
					<?php if(UtilAuth::isLogin($model->project->pro_uid)):?>
					<li class="modify"><?php echo UtilAuth::getAuthLinks('编辑', array('update','id'=>$model->project->pro_id));?></li>
					<?php endif;?>
                </ul>
                <div class="post-entry">
     				<div class="right" style="margin-top: -50px;">
                        <?php if(UtilAuth::isLogin($model->project->pro_uid)):?>
    					<button class="cupid-blue" onclick="location.href='<?php echo $this->createUrl('solution',array('id'=>$model->project->pro_id)) ?>'">创建新解决方案</button>
                        <?php endif;?>
    				</div>
                    
                    <blockquote>
                        问题摘要：
                        <?php echo Project::model()->getBrifeDescript($model->project); ?>
                        <hr /> 
    
                    </blockquote>
                    <h2>解决方案：</h2>
                    <p>
                        特别鸣谢：以下解决方案提出者
                        <div style="border:1px dashed grey;font-style:italic;overflow:hidden;">			
                            <?php echo Yii::t('common','<span>Post By {user} On {time} Hits {hits}　{link}</span>',array(
                				'{user}'=> $model->user->user_name,
                				'{time}' => UtilTools::timeop($model->sol_created),
                				'{hits}' => $model->sol_hits,
                				'{link}' => UtilAuth::getAuthLinks('编辑', array('usolution','id'=>$model->sol_id))
                			));?></div>                    
                    </p>

                    <hr class="clearfix" />
 					<?php echo $model->sol_content;?>
                    <hr class="clearfix" />
                    <hr />
               	    <?php $this->widget('application.components.link.LabsPrevNextWidget',array(
                		'id'=>$model->project->pro_id
                	))?>   
                    <hr /> 
                </div> 
            </div>
            
            <h5>相关内容</h5>
            <ul id="tabs">
                <li class="active"><a href="#tab1">评论</a></li>
                <li class=""><a href="#tab2">我有话要说</a></li>
            </ul>
            <div id="tabs_content_container">
                <div style="display: block;" id="tab1" class="tab-content">
                     
                     <?php $this->widget('application.components.comment.CommentListWidget', array(
                            'controller'=>$this->id,
                            'action'=>$this->action->id,
                            'id'=>$model->sol_id 
                     ) ); ?>

                </div>
                <div style="display: none;" id="tab2" class="tab-content">
                    <?php $this->widget('application.components.comment.CommentFormWidget',array(
                            'id'=>$model->sol_id,
                            'controller'=>$this->id,
                            'action'=>$this->action->id
                    )); ?>
                </div>
            </div> 
